/**
 * 2016，thor.com，all rights reserved。
 * 
 * Project：		palmmall-spi
 * Filename：	UserService.java
 * Created：		2016年7月26日
 * Creator：		wolv
 */
package com.thor.palmmall.rest.user;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.thor.commons.entity.UCN;
import com.thor.commons.exception.ThorServiceException;
import com.thor.commons.query.QueryResult;
import com.thor.palmmall.rest.common.ACodeNameQueryParam;

/**
 * @author wolv
 *
 */
@Path("/authenticates")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface AUserService {

	@POST
	@Path(value = "/tenant-authen")
	ATenantUser tenantLogin(AAuthenInfo authen) throws ThorServiceException;

	@POST
	@Path(value = "/market-authen")
	AUser marketLogin(AAuthenInfo authen) throws ThorServiceException;

	@PUT
	@Path(value = "/{id}/password")
	void changePassword(@PathParam("id") String id, APasswordInfo password) throws ThorServiceException;

	@POST
	@Path("/query")
	QueryResult<UCN> query(ACodeNameQueryParam param) throws ThorServiceException;
	
	 
	/**
	 * 登录页获取下载附件列表
	 * @return
	 * @throws ThorServiceException
	 */
	@GET
	@Path("/getattachments/{enterpraise}")
	String getAttachments(@PathParam("enterpraise") String enterpraise) throws ThorServiceException;
	/**
	 * 获取配置
	 * @return
	 * @throws ThorServiceException
	 */
	@GET
	@Path("/getOptionByStore/{enterpraise}")
	String getOptionByStore(@PathParam("enterpraise") String enterpraise) throws ThorServiceException;
	  
}
